package com.probox.modules.controller.wechat;

import com.probox.common.core.web.domain.AjaxResult;
import com.probox.common.entity.service.wechat.IWechatBroadcastProductMiddleService;
import com.probox.common.log.annotation.Log;
import com.probox.common.log.enums.BusinessType;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Kite
 * @date 2021/8/3
 */
@RestController
@RequestMapping("/wechat/broadcast/WechatBroadcastMiddleController")
public class WechatBroadcastMiddleController {

    @Autowired
    private IWechatBroadcastProductMiddleService wechatBroadcastProductMiddleService;

    /**
     * 查询直播间下商品列表
     */
    @ApiOperation(value = "查询直播间下商品列表")
    @Log(title = "查询直播间下商品列表", businessType = BusinessType.GRANT)
    @GetMapping("/getBroadcastMiddle/{roomId}")
    public AjaxResult getBroadcastMiddle(@PathVariable("roomId") Long roomId) {
        return AjaxResult.success(wechatBroadcastProductMiddleService.getBroadcastMiddle(roomId));
    }
}
